﻿namespace sgf.server
{
    public static class TaskUtil
    {
        public static void Run(Func<Task> action)
        {
            Task.Run(async () =>
            {
                try
                {
                    await action();
                }
                catch (Exception e)
                {
                    LogMgr.Error($"{e.Message}, {e.StackTrace}");
                    throw;
                }
            });
        }
    }
}